/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ColdChainTransportTracker {
    static categoryCode = '040040007';

    static categoryName = '冷链运输定位器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return ColdChainTransportTracker.categoryCode;
    }

    get categoryName() {
        return ColdChainTransportTracker.categoryName;
    }

    getGpsPosition(params) {
        return command({
            method: 'getGpsPosition',
            methodId: 'pZwpBgfb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'pDNVDQk1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRingSwitch(params) {
        return command({
            method: 'getRingSwitch',
            methodId: 'p1RY46Ik',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSignalIntensity(params) {
        return command({
            method: 'getSignalIntensity',
            methodId: 'pGegeelq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'pgyAbBVo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'pUjL70vx',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setOrientation(params) {
        return command({
            method: 'setOrientation',
            methodId: 'pes4SR03',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRingSwitch(params) {
        return command({
            method: 'setRingSwitch',
            methodId: 'ppbbtWcG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ColdChainTransportTracker;
